#pragma once

#include "ConfigurationUtil.h"

using Utility::Configuration::CConfigurationUtil;

//this message is used to indicate the edit box value has been changed
#define WM_KEYCODE_CHANGED WM_USER+1

/////////////////////////////////////////////////////////////////////////////
// CMyEditCtrl window

class CMyEditCtrl : public CEdit
{
	// Construction
public:
	CMyEditCtrl(CDialog* parentDlg);
	CMyEditCtrl();

	void setParentDlg( CDialog* parent ){ m_parentDlg = parent; }

	// Implementation
public:
	virtual ~CMyEditCtrl();
	// Generated message map functions
protected:
	//config instance
	CConfigurationUtil* m_pConfig;

	CDialog* m_parentDlg;

	DECLARE_MESSAGE_MAP()
	//override the following three functions to only accept one key in the edit control
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
};
